import React from 'react';
import {Input, Select} from 'antd';

const ChargeSelectInput = ({ label, value, onChange, options }) => {
    const handleInputChange = (e) => {
        onChange(e);
    };

    return (
        <div style={{ display: 'flex', alignItems: 'center', gap: 8 }}>
            <span style={{ minWidth: 60 }}>{label}:</span>
            <Select
                style={{width: 180}}
                value={value}
                options={options}
                onChange={handleInputChange}
                allowClear
            />
        </div>
    );
};

export default React.memo(ChargeSelectInput);